home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Enciclopedia Del Perro
/
Enciclopedia Del Perro.iso
/
info31
/
simple3.sc_
/
simple3.sc
Wrap
Text File
|
1994-05-17
|
3KB
|
81 lines
<******************************************************* language=slang
Sample SLANG Modem Dialup Script
Description:
Simple Example #3 -- Written in the SLANG scripting language
This script dials the modem, enters a user-id after a short
delay, then a password after another short delay. Lastly,
packet mode is enabled so enable TCP/IP data transfers.
This script does not store a user id or password directly,
but uses the ones that were entered in WDial's Configuration
Window.
To Use This Script:
Change "0000" to the phone number of the remote machine you
would like to connect to.
Be sure the enter your password and user id in WDial's
Configuration Window.
Adjust the intervals in the (pause,...) functions to suit
your needs. These are in milliseconds (5000 milliseconds ==
5 seconds).
This script assumes that your modem, and the remote host,
terminate commands with an ASCII Carrage-Return character.
If, instead, a Carrage-Return/Line-Feed (CRLF) is required,
change "(cr)" to "(cr)(lf)" everywhere in the script it is
necessary.
Notes:
This is a very simple dial script. It assumes that:
o the modem connection will always be made
o the remote machine will always be ready for your
user-id after a set interval
o like-wise for your password
This script is optimistic and makes no provisions for errors.
More complex examples provided demonstrate error handling,
and many other options using features of SLANG.
Built-In SLANG Functions Used:
send Send a character string to the modem.
cr Return a Carriage-Return character.
pause Wait a specified number of milliseconds.
username Return username from WDial's Configuration Window.
password Return password from WDial's Configuration Window.
changemode Changes mode of connection from "raw" to "packet".
************************************************************************>
(send, <* Dial the remote modem/host *>
{ATDT0000} <* Modem command and phone number *>
(cr) <* Carrage-Return after modem cmd *>
) <* End of "send" function *>
(pause, 30000) <* Wait for the modem to connect *>
(send, <* Log-in to the remote modem/host *>
(username) <* Send your user id *>
)
(send,
(cr) <* Carriage-Return after user id *>
) <* End of "send" function *>
(pause, 5000) <* Wait for a password prompt *>
(send, <* Send the password *>
(password) <* Send password *>
)
(send,
(cr) <* Carriage-Return after password *>
) <* End of "send" function *>
(pause, 5000) <* Pause for a moment *>
(changemode, packet) <* Change to "packet" mode *>